﻿<Page x:Class="WpfEffect3._5.PageBlurBitmapEffect"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      mc:Ignorable="d" 
      d:DesignHeight="300" d:DesignWidth="800"
	Title="PageBlurBitmapEffect">
    <Canvas>
        
        
        <Image Canvas.Left="493" Canvas.Top="10" Height="150" Name="image2" Source="images/1.png" Stretch="Fill" Width="160">
            <Image.BitmapEffect>
                <BlurBitmapEffect  x:Name="effect" KernelType="Gaussian" Radius="5" />
            </Image.BitmapEffect>
        </Image>
        <TextBlock Canvas.Left="505" Canvas.Top="194" FontSize="25" Height="47" Name="textBlock2" Text="测试字" Width="181">
            <TextBlock.BitmapEffect>
                 <BlurBitmapEffect   KernelType="{Binding ElementName=effect,Path=KernelType,Mode=OneWay}" Radius="{Binding ElementName=effect,Path=Radius,Mode=OneWay}" />
            </TextBlock.BitmapEffect>
        </TextBlock>
        
        <TextBox Canvas.Left="10" Canvas.Top="186" Height="78" Name="textBox1" TextWrapping="Wrap" Width="398" />
        <StackPanel Canvas.Left="108" Canvas.Top="10" Orientation="Horizontal">
            <RadioButton Checked="KernelType_Checked" Content="Box" GroupName="RenderingBias" Height="16" IsChecked="True" Name="radioButton3" Width="100" />
            <RadioButton Checked="KernelType_Checked" Content="Gaussian" GroupName="RenderingBias" Height="16" Name="radioButton4" Width="100" />
        </StackPanel>
        <TextBlock Canvas.Left="10" Canvas.Top="10" Height="21" Name="textBlock3" Text="KernelType" Width="89" />
        <Slider AutoToolTipPlacement="BottomRight" AutoToolTipPrecision="1" Canvas.Left="96" Canvas.Top="46" Height="22" Interval="1" LargeChange="1" Maximum="30" Minimum="0" Name="sldRadius" 
                Value="{Binding ElementName=effect, Path=Radius}" Width="312" />
        <TextBlock Canvas.Left="10" Canvas.Top="46" Height="21" Name="tbRadius" Text="Radius" Width="89" />
    </Canvas>
</Page>
